#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <assert.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>
#include <unistd.h>
#include <sys/time.h>

#include "queue.h"
#include "common.h"
#include "es.h"
#include "ls.h"
#include "rt.h"
#include "n2h.h"

#define DEBUG 0
#define INFINITY 0xFFFFFF

#define MAX_NODES 256
/* This is enough space for the header of the packet (4 bytes)
 * and 256 updates (4 bytes each), and then some extra space. */
#define MAX_BUFFER_SIZE 2048

void dvp(int verb);
void send_rt();
void update_rt_from_ls();
void create_packet(char **buffer, int *len); /* buffer and len are out variables */
void process_packet(node src, char *packet);
